require 'test/unit'
require 'Modele/Acces'
require 'Modele/Parking'
require 'Modele/Vehicule'
require 'Modele/Dbconect'

class AccesTest < Test::Unit::TestCase
  
  def test_affecter_places_vide
    Dbconect.creationbd("test")
    parking = Parking.new("test",3)
    vehi = Vehicule.new("999-fgh-30",15,19)
    assert(parking.acces[0].affecter_place(vehi,nil),"test_affecter_places_vide fail")
  end
  
  def test_affecter_places_plein
      Dbconect.creationbd("test")
      parking = Parking.new("test",0)
      vehi = Vehicule.new("999-fgh-30",15,19)
      assert(parking.acces[0].affecter_place(vehi,nil) == nil,"test_affecter_places_plein fail")
  end

  
end